﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Models;

namespace DAL
{
    public class CarDAL
    {
        //根据CarID进行删除
        public static bool deleteByIdDAL(int ID)
        {
            string sql=string.Format("DELETE FROM tb_Car WHERE CarID={0}",ID);
            return DBHelper.ExecuteNonQuery(sql);
        }
        //添加
        public static bool addCarDAL(Car car)
        {
            string sql = string.Format("insert into tb_Car(UserID,GoodsID,Num) values({0},{1},{2})", car.UserID, car.GoodsID, car.Num);
            return DBHelper.ExecuteNonQuery(sql);
        }
    }
}
